import { NextResponse } from 'next/server'
import type { NextRequest } from 'next/server'

export function withLogging(request: NextRequest): NextResponse {
    console.log(`请求方法[${request.method}] ${request.nextUrl.pathname}`)
    // 返回 NextResponse 会中断中间件链的执行，而返回 null 则会继续执行后续中间件。
    return NextResponse.next()
}
